#include "support.h"

int split(const string &s, vector<string> &ret){ 

    string :: size_type i = 0;
    const char idle = '/';
	  
    while (i != s.size()){ 
		// First occurance of idle character - low bound 
		for (;i != s.size() && idle == s[i]; i++);
		string :: size_type j = i; 
		// Count until second occurance - high bound 
		for (; j != s.size() && idle != s[j]; j++);
		if (i != j) { 
		    // get string part from low to high bound index 
	    	ret.push_back(s.substr(i, j - i)); 
	    	i = j; 
		} 
    }
    return 0;
  
};
